<template>
  <view class="date-select">
    <van-field
      :value="nowValue"
      :label="label"
      label-class="label-class"
      input-class="input-class"
      @change="nowValue = $event.mp.detail"
      @click-input="showPopup"
      placeholder="请输入"
      readonly
    />
    <van-popup
      :show="ifShow"
      position="bottom"
      custom-style="height: 40%;"
      @close="dataCancel"
    >
      <van-datetime-picker
        type="date"
        :value="currentDate"
        :title="label"
        @confirm="dataConfirm"
        @cancel="dataCancel"
        :formatter="formatter"
        :min-date="minDate"
        :max-date="maxDate"
      />
    </van-popup>
  </view>
</template>
<script src="./script.js"></script>
<style src="./style.less" lang="less"></style>
